package cn.lbf.stuniversity.shiro.controller;

import cn.lbf.stuniversity.shiro.dao.UserDao;
import cn.lbf.stuniversity.shiro.entity.User;
import cn.lbf.stuniversity.shiro.service.UserService;
import cn.lbf.stuniversity.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/login")
@CrossOrigin
public class LoginController {
    @Autowired
    private UserService userService;
    @PostMapping("/signIn")
    public Result<Map<String,Object>> login(@RequestBody User user) {
        return userService.login(user);
    }
}
